package cn.jiajunsong.feignconsumer.controller;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="hello-service",fallback = HelloServiceFallback.class)
public interface HelloService {
    @GetMapping("/hello")
    String hello();

    @GetMapping("/hello1")
    String hello(@RequestParam("name") String name);

    @GetMapping("/hello2")
    User hello(@RequestHeader("name") String name,@RequestHeader("age") Integer age);

    @GetMapping("/hello3")
    String hello(@RequestBody User user);

}
